package org.sy.lab.Java7并发编程实战.七定制并发类.三实现ThreadFactory接口生成定制线程;

public class Main {
	public static void main(String[] args) throws InterruptedException {
		MyThreadFactory myThreadFactory = new MyThreadFactory("MyThreadFactory");
		MyTask task = new MyTask();
		Thread thread = myThreadFactory.newThread(task);
		thread.start();
		thread.join();
		System.out.printf("Main: THread information.\n");
		System.out.printf("%s\n", thread);
		System.out.printf("Main: End of the example.\n");
	}
}
